
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
* @author :${author}
* @description: ${desc}数据库操作类
* @create date: ${createDate}
*/

public interface ${entityName}Mapper {

    int insert(${entityName} record);

    int insertSelective(${entityName} record);

    int countByExample(${entityName}Criteria example);

    int deleteByExample(${entityName}Criteria example);

    <#if primaryKey!='noPrimaryKey'>
    int deleteByPrimaryKey(${javaKeyType} id);

    ${entityName} selectByPrimaryKey(${javaKeyType} id);
    </#if>
    List<${entityName}> selectByExample(${entityName}Criteria example);

    ${entityName} selectByUniqCond(${entityName}Criteria example);

    int updateByExampleSelective(@Param("record") ${entityName} record, @Param("example") ${entityName}Criteria example);

    int updateByExample(@Param("record") ${entityName} record, @Param("example") ${entityName}Criteria example);

    <#if primaryKey!='noPrimaryKey'>
    int updateByPrimaryKeySelective(${entityName} record);

    int updateByPrimaryKey(${entityName} record);

    Integer batchUpdate(List<${entityName}> list);
    </#if>

    Integer batchInsert(List<${entityName}> list);

}
